import { tbclass } from '../../../atoms/db';

/**
 * 获取全部班级
 */
export default async function getgrades() {
	// 从班级表查询年级
	const data = await tbclass()
		.distinct('grade')
		.orderBy('grade', 'asc');
	return data.map((it) => {
		return it.grade;
	});
}
